﻿<!--#include file="../mae/mae.asp"-->
<%
res.Charset = "utf-8"

'初始化
Mo.Start "../mae/Mo", E_ERROR, E_LOG, E_WARNING

function EASPMAE()
	dim SoapClient,InstSoap, Parms : set SoapClient = require("net/http/soap.js")
	
	set InstSoap = SoapClient("http://webservice.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx","http://WebXml.com.cn/")
	F.echo "<h3>"+InstSoap.Url+"</h3>", true

	'设置方法的参数，主要用于复杂请求，例如方法参数为一个对象/类
	set Parms = KeyValue()
	Parms "theIpAddress","222.195.158.135"
	set InstSoap.Parms = Parms.valueOf()
	
	F.echo "<h4>Response:</h4>", true
	F.echo F.encodeHtml(InstSoap.Invoke("getCountryCityByIp")), true
	F.echo "<h4>Request:</h4>", true
	F.echo F.encodeHtml(InstSoap.Request), true


	'简单的请求，直接将参数放在Invoke方法即可
	'InstSoap.Invoke("getCountryCityByIp","theIpAddress","222.195.158.135") 
end function
	
'必要的清理
Mo.End()
%>